Optimal. Leaf size=81 \[ \frac {\text {ArcTan}\left (\frac {\sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{a \sqrt {d} f}+\frac {\tanh ^{-1}\left (\frac {\sqrt {d} (1+\tan (e+f x))}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{\sqrt {2} a \sqrt {d} f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 81, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {3655, 3613,
214, 3715, 65, 211} \begin {gather*} \frac {\text {ArcTan}\left (\frac {\sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{a \sqrt {d} f}+\frac {\tanh ^{-1}\left (\frac {\sqrt {d} (\tan (e+f x)+1)}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{\sqrt {2} a \sqrt {d} f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 211
Rule 214
Rule 3613
Rule 3655
Rule 3715
Rubi steps
\begin {align*} \int \frac {1}{\sqrt {d \tan (e+f x)} (a+a \tan (e+f x))} \, dx &=\frac {1}{2} \int \frac {1+\tan ^2(e+f x)}{\sqrt {d \tan (e+f x)} (a+a \tan (e+f x))} \, dx+\frac {\int \frac {a-a \tan (e+f x)}{\sqrt {d \tan (e+f x)}} \, dx}{2 a^2}\\ &=\frac {\text {Subst}\left (\int \frac {1}{\sqrt {d x} (a+a x)} \, dx,x,\tan (e+f x)\right )}{2 f}-\frac {\text {Subst}\left (\int \frac {1}{-2 a^2+d x^2} \, dx,x,\frac {a+a \tan (e+f x)}{\sqrt {d \tan (e+f x)}}\right )}{f}\\ &=\frac {\tanh ^{-1}\left (\frac {\sqrt {d} (1+\tan (e+f x))}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{\sqrt {2} a \sqrt {d} f}+\frac {\text {Subst}\left (\int \frac {1}{a+\frac {a x^2}{d}} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{d f}\\ &=\frac {\tan ^{-1}\left (\frac {\sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{a \sqrt {d} f}+\frac {\tanh ^{-1}\left (\frac {\sqrt {d} (1+\tan (e+f x))}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{\sqrt {2} a \sqrt {d} f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.49, size = 107, normalized size = 1.32 \begin {gather*} \frac {\left (4 \text {ArcTan}\left (\sqrt {\tan (e+f x)}\right )+\sqrt {2} \left (-\log \left (-1+\sqrt {2} \sqrt {\tan (e+f x)}-\tan (e+f x)\right )+\log \left (1+\sqrt {2} \sqrt {\tan (e+f x)}+\tan (e+f x)\right )\right )\right ) \sqrt {\tan (e+f x)}}{4 a f \sqrt {d \tan (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(303\) vs.
\(2(67)=134\).
time = 0.19, size = 304, normalized size = 3.75
method | result | size |
derivativedivides | \(\frac {2 d^{2} \left (\frac {\arctan \left (\frac {\sqrt {d \tan \left (f x +e \right )}}{\sqrt {d}}\right )}{2 d^{\frac {5}{2}}}+\frac {\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}-\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}}{2 d^{2}}\right )}{f a}\) | \(304\) |
default | \(\frac {2 d^{2} \left (\frac {\arctan \left (\frac {\sqrt {d \tan \left (f x +e \right )}}{\sqrt {d}}\right )}{2 d^{\frac {5}{2}}}+\frac {\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}-\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}}{2 d^{2}}\right )}{f a}\) | \(304\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.51, size = 115, normalized size = 1.42 \begin {gather*} \frac {\frac {d {\left (\frac {\sqrt {2} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{\sqrt {d}} - \frac {\sqrt {2} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{\sqrt {d}}\right )}}{a} + \frac {4 \, \sqrt {d} \arctan \left (\frac {\sqrt {d \tan \left (f x + e\right )}}{\sqrt {d}}\right )}{a}}{4 \, d f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.10, size = 221, normalized size = 2.73 \begin {gather*} \left [-\frac {\sqrt {2} \sqrt {-d} \arctan \left (\frac {\sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {-d} {\left (\tan \left (f x + e\right ) + 1\right )}}{2 \, d \tan \left (f x + e\right )}\right ) + \sqrt {-d} \log \left (\frac {d \tan \left (f x + e\right ) - 2 \, \sqrt {d \tan \left (f x + e\right )} \sqrt {-d} - d}{\tan \left (f x + e\right ) + 1}\right )}{2 \, a d f}, \frac {\sqrt {2} \sqrt {d} \log \left (\frac {d \tan \left (f x + e\right )^{2} + 2 \, \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} {\left (\tan \left (f x + e\right ) + 1\right )} + 4 \, d \tan \left (f x + e\right ) + d}{\tan \left (f x + e\right )^{2} + 1}\right ) + 4 \, \sqrt {d} \arctan \left (\frac {\sqrt {d \tan \left (f x + e\right )}}{\sqrt {d}}\right )}{4 \, a d f}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {1}{\sqrt {d \tan {\left (e + f x \right )}} \tan {\left (e + f x \right )} + \sqrt {d \tan {\left (e + f x \right )}}}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 260 vs.
\(2 (70) = 140\).
time = 0.58, size = 260, normalized size = 3.21 \begin {gather*} \frac {\sqrt {2} {\left (d \sqrt {{\left | d \right |}} - {\left | d \right |}^{\frac {3}{2}}\right )} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {{\left | d \right |}} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {{\left | d \right |}}}\right )}{4 \, a d^{2} f} + \frac {\sqrt {2} {\left (d \sqrt {{\left | d \right |}} - {\left | d \right |}^{\frac {3}{2}}\right )} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {{\left | d \right |}} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {{\left | d \right |}}}\right )}{4 \, a d^{2} f} + \frac {\arctan \left (\frac {\sqrt {d \tan \left (f x + e\right )}}{\sqrt {d}}\right )}{a \sqrt {d} f} + \frac {\sqrt {2} {\left (d \sqrt {{\left | d \right |}} + {\left | d \right |}^{\frac {3}{2}}\right )} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {{\left | d \right |}} + {\left | d \right |}\right )}{8 \, a d^{2} f} - \frac {\sqrt {2} {\left (d \sqrt {{\left | d \right |}} + {\left | d \right |}^{\frac {3}{2}}\right )} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {{\left | d \right |}} + {\left | d \right |}\right )}{8 \, a d^{2} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.34, size = 78, normalized size = 0.96 \begin {gather*} \frac {\mathrm {atan}\left (\frac {\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{\sqrt {d}}\right )}{a\,\sqrt {d}\,f}+\frac {\sqrt {2}\,\mathrm {atanh}\left (\frac {12\,\sqrt {2}\,d^{9/2}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{12\,d^5\,\mathrm {tan}\left (e+f\,x\right )+12\,d^5}\right )}{2\,a\,\sqrt {d}\,f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________